package auto;

import org.openqa.selenium.edge.EdgeDriver;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2023-04-06
 * Time: 17:23
 */
public class AutoDemo2 {
    // 浏览器导航栏操作
    EdgeDriver driver = new EdgeDriver();
    public void navigation() throws InterruptedException {
        // 进入百度首页 == driver.get()
        driver.navigate().to("https://www.baidu.com");
        Thread.sleep(2000);
        // 回退到浏览器原本页
        driver.navigate().back();
        // 前进到百度首页
        driver.navigate().forward();
        // 刷新百度页面
        driver.navigate().refresh();
        driver.quit();
    }

    public static void main(String[] args) throws InterruptedException {
        AutoDemo2 autoDemo2 = new AutoDemo2();
        autoDemo2.navigation();
    }
}
